#ifndef CANLENDAR_H
#define CANLENDAR_H

#include <QWidget>
#include<QPushButton>
#include<QLabel>

namespace Ui {
class canlendar;
}

class canlendar : public QWidget
{
    Q_OBJECT

private:
    void initControl();
    void initTopWidget();
    void initBottomWidget();
    void setDataLabelTimeText(int year, int month);

signals:
    void signalSetCalendarTime(const QDate& data);

private slots:
    void onbtnClicked();

protected:
    void paintCell(QPainter *painter, const QRect &rect, const QDate &date) const;

private:
    QPushButton* m_leftYearBtn;
    QPushButton* m_leftMonthBtn;

    QPushButton* m_rightYearBtn;
    QPushButton* m_rightMonthBtn;

    QPushButton* m_ensureBtn;
    QPushButton* m_toDayBtn;

    QLabel* m_dataLabel;

private:
    Ui::canlendar *ui;
};

#endif // CANLENDAR_H
